package com.luxury.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.luxury.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class


SettlementCenterActivity extends AppCompatActivity {

    @BindView(R.id.tv_dispatchPath_settlementCenter)
    TextView tv_DispatchPath;//显示送货方式  是快递还是自取
    @BindView(R.id.iv_emptyAddress_settlementCenter)
    ImageView iv_EmptyAddress;//没有地址显示的图片
    @BindView(R.id.tv_nameAndPhone_settlementCenter)
    TextView tv_NameAndPhone;//有地址时候 显示姓名和电话的
    @BindView(R.id.tv_addressDetail_settlementCenter)
    TextView tv_AddressDetail;//有地址的时候  显示详细地址的
    @BindView(R.id.rlayout_address_settlementCenter)
    RelativeLayout rlayout_Address;//有地址时候布局 点击事件
    @BindView(R.id.layout_address_settlementCenter)
    RelativeLayout layout_Address;//地址总布局 包括rlayout_Address和iv_EmptyAddress
    @BindView(R.id.tv_exchange_settlementCenter)
    TextView tv_Exchange;//显示优惠券签署的
    @BindView(R.id.layout_exchange_settlementCenter)
    RelativeLayout layout_Exchange;//优惠券布局  点击跳转
    @BindView(R.id.tv_bill_settlementCenter)
    TextView tv_Bill;//显示是否开发票
    @BindView(R.id.layout_bill_settlementCenter)
    RelativeLayout layout_Bill;//发票布局 点击跳转
    @BindView(R.id.tv_number_settlementCenter)
    TextView tv_Number;//显示几件商品
    @BindView(R.id.rv_productShow_settlementCenter)
    RecyclerView rv_ProductShow;//显示商品图片  需要判断 一件商品和多件商品布局不同
    @BindView(R.id.iv_goRight_settlementCenter)
    ImageView iv_GoRight;//多件商品时候有  一件商品时候隐藏
    @BindView(R.id.layout_productShow_settlementCenter)
    RelativeLayout layout_ProductShow;//商品展示的布局 产品种类>=2时候 有点击事件
    @BindView(R.id.tv_money_settlementCenter)
    TextView tv_Money;//显示商品金额
    @BindView(R.id.tv_exchageMoney_settlementCenter)
    TextView tv_ExchageMoney;//显示优惠券金额
    @BindView(R.id.view_finalPayment_settlementCenter)
    View view_FinalPayment;//尾款的view  当送货方式为自取时候显示
    @BindView(R.id.tv_finalPayment_settlementCenter)
    TextView tv_FinalPayment;//尾款的提示  当送货方式为自取时候显示
    @BindView(R.id.tv_realityMoney_settlementCenter)
    TextView tv_RealityMoney;//应付金额
    @BindView(R.id.tv_realityExchangeMoney_settlementCenter)
    TextView tv_RealityExchangeMoney;//优惠金额
    @BindView(R.id.btn_submitOrder_settlementCenter)
    Button btn_SubmitOrder;//提交订单的button
    private Context mContext = this;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settlementcenter);
        ButterKnife.bind(this);

    }

    //提交订单的按钮
    public void onSubmitOrder(View view) {
    }

    public void clickLayout(View view) {
        Intent intent = new Intent(mContext, CenterToActivity.class);
        switch (view.getId()) {
            //点击配送方式布局
            case R.id.layout_dispatchPath_settlementCenter:
                intent.putExtra("index", 0);
                intent.putExtra("title","配送方式");
                break;
            //点击地址栏  没有的话显示您还没有地址  有地址点击可以修改或者添加
            case R.id.layout_address_settlementCenter:
                intent.putExtra("index", 1);
                intent.putExtra("title","收货地址");

                break;
            //点击选择是不是用优惠券以及用哪个优惠券
            case R.id.layout_exchange_settlementCenter:
                intent.putExtra("index", 2);
                intent.putExtra("title","使用优惠卷");

                break;
            //点击发票的   选择开不开发票
            case R.id.layout_bill_settlementCenter:
                intent.putExtra("index", 3);
                intent.putExtra("title","发票");

                break;
        }
        startActivity(intent);

    }
}
